Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

app/src/main/java/com/geeksville/mesh/ui/connections/DeviceType.kt 1c3784235e7e20ed88e054097d2e7addbff92dc3 (1c378423) Text, 1.28 KB

T8b949e/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

Tff7b72package T7ee787com.geeksville.mesh.ui.connections

Tff7b72import T7ee787com.geeksville.mesh.model.NO_DEVICE_SELECTED

Tff7b72enum Tff7b72class T56d364DeviceType Tb4b4b4{
Te6edf3BLETb4b4b4,
Te6edf3TCPTb4b4b4,
Te6edf3USBTb4b4b4,
Tb4b4b4;

Tff7b72companion Tff7b72object Tb4b4b4{
Tff7b72fun Td2a8fffromAddressTb4b4b4(Te6edf3addressTb4b4b4: Tffa657StringTb4b4b4)Tb4b4b4: Te6edf3DeviceType? Tff7b72= Tff7b72when Tb4b4b4(Te6edf3addressTb4b4b4.Te6edf3firstOrNullTb4b4b4(Tb4b4b4)Tb4b4b4) Tb4b4b4{
Ta5d6ff'x' Tff7b72-Tff7b72> Te6edf3BLE
Ta5d6ff's' Tff7b72-Tff7b72> Te6edf3USB
Ta5d6ff't' Tff7b72-Tff7b72> Te6edf3TCP
Ta5d6ff'm' Tff7b72-Tff7b72> Te6edf3USB T8b949e// Treat mock as USB for UI purposes
Ta5d6ff'n' Tff7b72-Tff7b72>
Tff7b72when Tb4b4b4(Te6edf3addressTb4b4b4) Tb4b4b4{
Te6edf3NO_DEVICE_SELECTED Tff7b72-Tff7b72> Tff7b72null
Tff7b72else Tff7b72-Tff7b72> Tff7b72null
Tb4b4b4}

Tff7b72else Tff7b72-Tff7b72> Tff7b72null
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s